package com.company;

import java.util.ArrayList;

/**
 * @description:
 * @author: 10445
 * @date: Created in 2020/6/12 23:57
 * @version: v1.0
 * @modified By:
 */
public class RoomSet {
    private ArrayList<Room> rooms = new ArrayList<>();

    public Room get(String description){
        Room room = null;
        for (Room item:rooms
        ) {
            if (true==description.equals(item.getDescription())){
                room=item;
                break;
            }
        }
        return room;
    }

    public RoomSet() {
    }

    public RoomSet(ArrayList<Room> rooms) {
        this.rooms = rooms;
    }

    public ArrayList<Room> getRooms() {
        return rooms;
    }

    public void setRooms(ArrayList<Room> rooms) {
        this.rooms = rooms;
    }
}
